﻿using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;

[RequireComponent(typeof(TMPro.TextMeshProUGUI))]
public class TMPTextFont : MonoBehaviour {

    TextMeshProUGUI m_Text;
    TextMeshProUGUI text
    {
        get
        {
            if(m_Text == null)
                m_Text = GetComponent<TextMeshProUGUI>();
            
            return m_Text;
        }
    }

    // Use this for initialization
    void Start () {

        var font =  ResourceManager.LoadTMPFont(Localization.language.ToString());
        if(font != null)
            text.font = font;
    }

    // Update is called once per frame
    void Update () {
		
	}
}
